package org.framework.common.api.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.framework.common.api.support.annotation.Chosen;
import org.framework.common.api.support.annotation.ChosenType;

/**
 * 行政区划
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年3月13日 上午9:09:59
 * @version 1.0.2016
 */
@Entity @Table(name = "TB_CORE_REGION")
public class CommonRegion extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = -1714165849295248634L;
	
	// 父ID
	@Column(name = "pid", length = 50, nullable = true)
	private String pid;

	// 名称
	@Column(name = "name", length = 50, nullable = true)
	private String name;

	// 区号
	@Column(name = "zone", length = 50, nullable = true)
	private String zone;

	// 简称
	@Column(name = "sname", length = 50, nullable = true)
	private String sname;

	// 级别
	@Column(name = "level", length = 5, nullable = true)
	private String level;

	// 邮编
	@Column(name = "zipcode", length = 10, nullable = true)
	private String zipcode;

	// 经度
	@Column(name = "lng", length = 50, nullable = true)
	private String lng;

	// 纬度
	@Column(name = "lat", length = 50, nullable = true)
	private String lat;

	// 拼音
	@Column(name = "pinyin", length = 50, nullable = true)
	private String pinyin;

	@Override
	@Chosen(type = ChosenType.VALUE)
	public String getId() {
		// TODO Auto-generated method stub
		return super.getId();
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getZone() {
		return zone;
	}

	public void setZone(String zone) {
		this.zone = zone;
	}

	@Chosen(type = ChosenType.TEXT)
	public String getSname() {
		return sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getZipcode() {
		return zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

	public String getLng() {
		return lng;
	}

	public void setLng(String lng) {
		this.lng = lng;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}
	
}

